package com.sfac.springBoot.modules.test.entity;

import com.sfac.springBoot.modules.common.entity.AbstractEntity;

import javax.persistence.*;
import java.util.List;

/**
 * @Description School
 * @Author HymanHu
 * @Date 2022/7/1 14:07
 */
@Entity
@Table(name = "test_school")
public class School extends AbstractEntity {

	private String schoolName;

	@OneToMany(mappedBy = "school", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	private List<Clazz> clazzs;

	public String getSchoolName() {
		return schoolName;
	}

	public void setSchoolName(String schoolName) {
		this.schoolName = schoolName;
	}

	public List<Clazz> getClazzs() {
		return clazzs;
	}

	public void setClazzs(List<Clazz> clazzs) {
		this.clazzs = clazzs;
	}
}
